package vn.com.epi.client;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;

public class RealServerTest {

	public static void main(String[] args) {
		try {
//			String connectionUrl = "jdbc:sqlserver://10.198.44.45;databaseName=Recommendation;user=sa;password=123456sql";
			String connectionUrl = "jdbc:sqlserver://10.30.11.29;databaseName=Recommendation;user=baomoi;password=baomoi2015";
			Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
			Connection connection = DriverManager.getConnection(connectionUrl);
			if (connection != null) {
				DatabaseMetaData dm = (DatabaseMetaData) connection.getMetaData();
				System.out.println("Driver name: " + dm.getDriverName());
				System.out.println("Driver version: " + dm.getDriverVersion());
				System.out.println("Product name: "	+ dm.getDatabaseProductName());
				System.out.println("Product version: " + dm.getDatabaseProductVersion());
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

	}
}
